package com.aimuceliang.aimuceliang.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.aimuceliang.aimuceliang.AppManager;
import com.aimuceliang.aimuceliang.dev.R;
import com.aimuceliang.aimuceliang.ui.BaseActivity;
import com.aimuceliang.aimuceliang.ui.WebViewActivity;
import com.aimuceliang.aimuceliang.utils.SharePreferenceUtil;
import com.aimuceliang.aimuceliang.utils.T;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by ziabo on 2017/7/27.
 * 设置页面
 */

public class SettingsActivity extends BaseActivity {

    @BindView(R.id.tv_version_info)
    TextView vTvVersionInfo;

    @Override
    protected int initContentView() {
        return R.layout.activity_settings;
    }

    @Override
    protected void initUIAndListener() {
        setTitle("设置");
    }

    @Override
    protected void initData() {

    }

    @OnClick({R.id.main_iv_left, R.id.layout_check_pwd, R.id.layout_about_us, R.id.layout_check_version, /*R.id.layout_feedback, */R.id.tv_exit})
    public void onClicks(View view) {
        switch (view.getId()) {
            case R.id.main_iv_left:
                finish();
                break;
            case R.id.layout_check_pwd://修改密码
                startActivity(ModifyPwdActivity.class);
                break;
            case R.id.layout_about_us://关于我们
                startActivity(AboutUsActivity.class);
                break;
            case R.id.layout_check_version://版本更新
                T.showShort("版本更新");
                break;
            /*
            case R.id.layout_feedback://反馈
                WebViewActivity.startActivity(this, "反馈", "http://admin.danmch.net/regsystem/feedbackmanager/feedback.jsp");
                break;
            */
            case R.id.tv_exit:
                //SharePreferenceUtil.saveUsername(this, "");
                //SharePreferenceUtil.savePassword(this, "");
                startActivity(LoginActivity.class);
                AppManager.getAppManager().finishAllActivity();
                break;
        }
    }
}
